<template>
  <div class="title">子传父 DefineEmits</div>
     <div class="inner">
       <sendChildVue @toFather="recriveFromSon" @toFatherobj="recriveFromSon1"></sendChildVue>
       <span>显示来自子组件的值:<b>{{content}}</b></span>
       <span>显示来自子组件的对象值:<b> 姓名：{{person.name}} 爱好：{{person.rabit}}</b></span>
     </div>
</template>

<script setup>
import {ref} from 'vue';
import sendChildVue from '../../components/communicationParties/sendChild.vue';
let content=ref(null);
let person =ref('');
function recriveFromSon(va){
  content.value=va;
}
function recriveFromSon1(va){
   person.value=va;
}
</script>
<style scoped>
span{
   display: block;
    margin: 10px;
}
</style>